package com.djk.service.impl;

import com.djk.mapper.SysUserMapper;
import com.djk.pojo.SysUser;
import com.djk.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysUserServiceImpl implements SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;
    @Override
    public SysUser findUser(String username) {
        SysUser user = sysUserMapper.findByName(username);
        return user;
    }

    @Override
    public SysUser checkUsernameAndUserPwd(SysUser sysUser) {
        return sysUserMapper.findByNameAndPwd(sysUser);
    }

    @Override
    public void addUser(SysUser sysUser) {
        sysUserMapper.add(sysUser);
    }
}
